1. Field of the Invention
The present invention relates generally to a multilevel-coding apparatus for recovering binarized image data to multilevel image data and a multilevel-coding method for use in such an apparatus.
2. Description of the Related Art
A conventional multilevel-coding method of recovering a binarized image to a multilevel image is disclosed in, for example, Japanese Patent Laid-Open No. 117072/1987.
The binarizing method used in such a multilevel-coding method is a dither method employing a fixed matrix. For this reason, even when binarized image data is recovered to multilevel image data, a binarized dither pattern is known in advance.
Accordingly, the size of the window recovered can be varied by again binarizing a recovered halftone image and matching it to the dither pattern.
However, in this dither method using such a fixed matrix, a high quality image is difficult to obtain and it is, therefore, impossible to avoid the problem that the image quality is inferior.
In such a situation, density-preserving type binarizing methods such as an error diffusion method, an average-error minimizing method and the like have recently received special attention as a binarizing method of improving the quality of a binarized image to produce a high-quality image.
The average-error minimizing method which is one of the density-preserving type binarizing methods is described in, for example, "Image from Computers", IEEE Spectrum 6, pages 66-78 (1969), M. R. Shroeder et al.
In general, the density-preserving type binarizing method differs from the dither method in that the matrix size is not fixed and adaptively varies in accordance with the state of shading of an image.
Accordingly, unlike the dither method using a fixed matrix which is disclosed in Japanese Patent Laid Open No. 17072/1987, in the density-preserving type binarizing method it is impossible to estimate a dither matrix which should be binarized in advance.
For this reason, in a case where an image which is binarized by the density-preserving type binarizing method is recovered to a multilevel image by means of a fixed window, if the size of the window is small, a reproduced image with good resolution is obtained, but a moire may occur in a highlight portion of the reproduced image due to the printing pitch and the window size of the binarized image.
If the size of the window is made large, the moire will become a pattern of a low-frequency wave or it may disappear, but the resolution will degrade to a remarkable extent. Accordingly, whether the window size is made large or small, a deterioration in image quality will result.
For this reason, if an image which is binarized by the density-preserving type multilevel-coding method is to be recovered to a high-quality multilevel image, an optimum window size must be determined.